<!DOCTYPE html>
<html lang="en">
	<head>
		<include file="Index/head" />
	</head>

	<body>
		<include file="Index/header" />

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<include file="Index/menu" />
				
				<div class="main-content">
					<include file="Index/nav" />

					<div class="page-content">
						
							<!-- /**
							 * 右侧页面begin
							 */ -->
								<div class="row">
									<div class="col-xs-12">
										<div class="table-header">
											分类列表
										</div>

										<div class="table-responsive">
											<div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
											<div class="row">
											<div class="col-sm-6">
											<div id="sample-table-2_length" class="dataTables_length">

											</div>
											</div>
											<div class="col-sm-6">
											<div class="dataTables_filter" id="sample-table-2_filter">
											<!-- <label>搜索: <input type="text" aria-controls="sample-table-2">

											</label> -->
											<a href="javascript:history.go(-1)">
											<button class="" type="button">
												<i class="icon-undo bigger-110"></i>
												返回
											</button>
											</a>
											</div>
											</div>
											</div>
											<table id="sample-table-2" class="table table-striped table-bordered table-hover dataTable" aria-describedby="sample-table-2_info">
												<thead>
													<tr role="row"><th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">ID</th>
													<th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">{$fname}类子类</th>
													<th role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Price: activate to sort column ascending">是否显示</th>
													<th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">编号</th>
													<th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" aria-label="">管理</th></tr>
												</thead>
						
											<!-- <tbody role="alert" aria-live="polite" aria-relevant="all"> -->
											<volist name="list" id="vo">
											<tr class="odd">
												<td class=" ">
													<a href="#">{$vo.id}</a>
												</td>
												<td class=" ">
													<a href="{:U('Admin/Product/classify_lists_grandson',array('id' => $vo['id'],'fname' => $vo['name'],'fid' => $fid))}">{$vo.name}</a>
												</td>
												<td class=" ">{$vo.state}</td>
												<td class=" ">{$vo.name_tag}</td>
												<td class=" ">
												<div class="btn-group">
													<button data-toggle="dropdown" class="btn btn-sm btn-danger dropdown-toggle">
														管理
														<i class="icon-angle-down icon-on-right"></i>
													</button>

													<ul class="dropdown-menu dropdown-danger">
														<li>
															<a href="{:U('Admin/Product/update_classify_son',array('id'=>$vo['id'],'fid' => $fid))}">修改</a>
														</li>
														<li>
															<a href="{:U('Admin/Product/add_classify_grandson',array('id'=>$vo['id'],'fid' => $fid,'fname' => $vo['name']))}">添加孙类</a>
														</li>
														<li>
															<a href="javascript:del_classify_son({$vo.id})">删除</a>
														</li>
													</ul>
												</div>
													
												</td>
											</tr>
											</volist>
										</div>
									</div>
								</div>

						</div>


							<!-- /**
							 * 右侧页面end
							 */ -->
					</div><!-- /.page-content -->
				</div>

			</div><!-- /.main-container-inner -->
															
			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->
		<include file="Index/footer" />
		<script type="text/javascript">
		function del_classify_son(id){
			var r= confirm('确定删除分类?');
			var now_url = window.location.href;
			if(r){
				var url = "{:U('Admin/Product/del_classify_son')}";
				var id = id;
				$.ajax({
					type: 'post',
					url: url,
					data: {id:id},
					dataType: 'json',
					success: function(data){
						if(data==1){
							window.location.href=now_url;
						}
					}
				});
			}else{
				return false;
			}
		}
		</script>
	</body>
</html>
